package com.suma.platform.core.mq;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

/**
 * @author suma
 * @date 2018/2/11 下午2:56
 */
@Component
public class Consume {

	@JmsListener(destination = "queue1")
	public void receiveQueue(String text) {
		System.out.println(text);
	}

	@JmsListener(destination = "topic1", containerFactory = "jmsListenerContainerTopic")
	public void receiveTopic(String text) {
		System.out.println(text);
	}
}
